import React, { useState } from "react";
import {Input, Button,} from "antd";
import { useNavigate } from "react-router-dom";

interface Props {
  changedepositlist:any
}
function DepositListtop1(props: Props) {
    var [data,setData] = useState('')
    var navigate = useNavigate();
    // var creat = function () {
    //     navigate("/index/home/deposit/depositList/createdeposit");
    //   };
    var search = function(){
      // Inventory_search({ name:data}).then((res)=>{
      //   // console.log("search",res.data);
      
      // })
      props.changedepositlist(data)
    }
    var handlenchange = function(event:any){
          const{value} = event.target
          setData(value)
          // console.log(event.target);
    }
  return (
    <div className="depositListtop">
     
      <div className="middle">
        <Input defaultValue={data} placeholder="请输入单号" />
        <Input defaultValue={data} placeholder="请选择仓库" />
        <Input  defaultValue={data} onChange={handlenchange} placeholder="请输入盘点人员" />
        {/* <Form.Item >
          <DatePicker  className="date"  placeholder="请选择申请日期"  />
        </Form.Item> */}
        {/* <Input defaultValue={data} placeholder="请选择状态" /> */}
        
        <Button type="primary" onClick={search}>
          搜索
        </Button>
        {/* <Button type="primary" onClick={creat}>
          创建
        </Button> */}
        {/* <Button type="primary">导出</Button> */}
      </div>
    </div>
  );
}

export default DepositListtop1;
